#include<stdio.h>
#include"SeqList.h"


int main()
{
	SL s;
	SL s1;
	SL s2;
	SL s3;
	SL s4;
	SL s5;
	SL s6;
	SeqListInit(&s);
	SeqListPushFront(&s, 1);
	SeqListPushFront(&s, 2);
	SeqListPushFront(&s, 9);
	SeqListPushFront(&s, 4);
	SeqListPushFront(&s, 5);
	SeqList_Draw_(&s);
	SeqList_PushBack_(&s, 7);
	SeqList_Draw_(&s);
	SeqList_PopBack_(&s);
	SeqList_Draw_(&s);
	SeqList_InsertFront(&s, 2, 11);
	SeqList_Draw_(&s);
	SeqList_PopInsertFront_(&s, 2);
	SeqList_Draw_(&s);
	printf("*************************\n");
	SeqList_Min(&s);
	SeqList_Draw_(&s);
	SeqList_Resever(&s);
	SeqList_Draw_(&s);
	//SeqList_repeat(&s, 3);
	//SeqList_DeleteOrder(&s, 2, 4);
	SeqList_Draw_(&s);
	SeqList_removeDuplicates(s.data, s.size);
	printf("***********************************\n");
	SeqListInit(&s1);
	SeqListInit(&s2);
	SeqList_PushBack_(&s1, 1);
	SeqList_PushBack_(&s1, 3);
	SeqList_PushBack_(&s1, 5);
	SeqList_PushBack_(&s1, 7);
	SeqList_PushBack_(&s1, 9);
	SeqList_PushBack_(&s2, 2);
	SeqList_PushBack_(&s2, 4);
	SeqList_PushBack_(&s2, 6);
	SeqList_PushBack_(&s2, 8);
	SeqList_PushBack_(&s2, 10);
	SeqList_Draw_(&s1);
	SeqList_Draw_(&s2);
	SeqList_Exchange(&s1, &s2);
	printf("***************************\n");
	SeqListInit(&s3);
	SeqList_PushBack_(&s3, 2);
	SeqList_PushBack_(&s3, 4);
	SeqList_PushBack_(&s3, 6);
	SeqList_PushBack_(&s3, 8);
	SeqList_PushBack_(&s3, 10);
	SeqList_PushBack_(&s3, 12);
	SeqList_Draw_(&s3);
	printf("**************\n");
	SeqList_Find_certain(&s3, 7);
	SeqList_Draw_(&s3);
	SeqList_Find_certain2(&s3, 7);
	SeqList_Draw_(&s3);
	SeqList_revolve(&s3,2);
	SeqList_Draw_(&s3);
	printf("*************************\n");
	SeqListInit(&s4);
	SeqList_PushBack_(&s4, 19);
	SeqList_PushBack_(&s4, 17);
	SeqList_PushBack_(&s4, 15);
	SeqList_PushBack_(&s4, 13);
	SeqList_PushBack_(&s4, 11);
	SeqList_Draw_(&s4);
	SeqListInit(&s5);
	SeqList_PushBack_(&s5, 20);
	SeqList_PushBack_(&s5, 8);
	SeqList_PushBack_(&s5, 6);
	SeqList_PushBack_(&s5, 4);
	SeqList_PushBack_(&s5, 2);
	SeqList_Draw_(&s5);
	SeqList_Median(&s4, &s5);
	printf("************************\n");
	SeqListInit(&s6);
	SeqList_PushBack_(&s6, 0);
	SeqList_PushBack_(&s6, 5);
	SeqList_PushBack_(&s6, 5);
	SeqList_PushBack_(&s6, 3);
	SeqList_PushBack_(&s6, 5);
	SeqList_PushBack_(&s6, 7);
	SeqList_PushBack_(&s6, 5);
	SeqList_PushBack_(&s6, 5);
	SeqList_Draw_(&s6);
	SeqList_Element(&s6);
	SeqList_Draw_(&s6);

	return 0;
}